package com.shtel.paas.monitorcenter.view.dispaly.message.middleware.monitor.controller;

import org.mybatis.spring.annotation.MapperScan;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

import com.shtel.paas.monitorcenter.util.Page;
import com.shtel.paas.monitorcenter.view.dispaly.message.middleware.monitor.entity.MessageMiddlewareMonitorEntity;
import com.shtel.paas.monitorcenter.view.dispaly.message.middleware.monitor.service.MessageMiddlewareMonitorService;
import com.shtel.paas.monitorcenter.view.dispaly.message.middleware.monitor.vo.MessageMiddlewareMonitorVo;

import org.springframework.web.bind.annotation.RestController;//@EnablePaasMybatis

@MapperScan("com.shtel.paas.monitorcenter.view.dispaly.message.middleware.monitor.mapper")
@RestController
public class MessageMiddlewareMonitorController {

	@Autowired
	MessageMiddlewareMonitorService messageMiddlewareMonitorService;

	/**
	 * 用户信息列表数据获取
	 */
	@GetMapping("/selectMessageMiddlewareMonitorInfo")
	public Page<MessageMiddlewareMonitorVo> selectMessageMiddlewareMonitorInfo(
			@RequestParam("page") Integer page,
			@RequestParam("size") Integer pageSize,
			@RequestParam("hostName") String hostName,
			@RequestParam("systemName") String systemName) {
		MessageMiddlewareMonitorEntity parameter = new MessageMiddlewareMonitorEntity();
		parameter.setPage(page);
		parameter.setSize(pageSize);
		parameter.setHostName(hostName);
		parameter.setSystemName(systemName);
		Page<MessageMiddlewareMonitorVo> result = messageMiddlewareMonitorService
				.selectMessageMiddlewareMonitorInfo(parameter);
		return result;
	}
}
